import { Public } from "../../financial"
import './index.less'
import ZingTable from "@/pages/login/ZingTable"
import { useState } from "react"
import { useNavigate } from 'react-router-dom'
const headValue=[
    {name:'用户名',key:'name'},
    {name:'用户类型',key:'type'},
    {name:'操作',key:'operate'}
]
const Power=()=>{
    let [bodyValue,setbodyValue]=useState(
        {id:1,content:[
            {name:'模板1',type:'管理员',operate:['修改权限','删除'],},
            {name:'模板1',type:'管理员',operate:['修改权限','删除'],},
            {name:'模板1',type:'管理员',operate:['修改权限','删除'],},
            {name:'模板1',type:'管理员',operate:['修改权限','删除'],},
            {name:'模板1',type:'管理员',operate:['修改权限','删除'],},
        ]}
        )
    const navigate = useNavigate();
    const toEdit=()=>{
        navigate('/home/settings/powerdetail')
    } 

    return(
        <div style={{height:700}}>
            <Public header={"权限设置"}></Public>
            <div className="VTadd"><button className="VTaddBut">增加</button></div>
            <div style={{paddingLeft:50}}><ZingTable operation1={toEdit} Tstyle={{width:1200,hbackgroundColor:'#22AB82',dlineHeight:5}}  theads={headValue} tbodys={bodyValue} operation1={toEdit}>
                </ZingTable></div>
        </div>
    )
}
export default Power